import React from 'react'
import { Image, Typography } from 'antd'
import styles from './TrProductImage.module.css'

interface PropsType {
  id: string | number
  size: 'large' | 'small'
  imageSrc: string
  price: number | string
  title: string
}

export const TrProductImage: React.FC<PropsType> = ({
  id,
  size,
  imageSrc,
  price,
  title,
}) => {
  return (
    <React.Fragment>
      <Image src={imageSrc} height={'80%'} width={'90%'} />
      <div className={styles['pro-title']}>
        <Typography.Text type='secondary'>{title.slice(0, 15)}</Typography.Text>
        <Typography.Text type='danger' strong>
          ¥ {price} 起
        </Typography.Text>
      </div>
    </React.Fragment>
  )
}
